local skel = fk.CreateSkill {
  name = "rmt__wuying",
  tags = {Skill.Lord},
}

skel:addEffect("active", {
  anim_type = "offensive",
  card_num = 1,
  target_num = 1,
  prompt = "#rmt__wuying",
  card_filter = function (self, player, to_select, selected)
    return #selected == 0 and Fk:getCardById(to_select).trueName == "slash"
  end,
  target_filter = function (self, player, to_select, selected, selected_cards)
    return #selected == 0 and player ~= to_select and #selected_cards > 0
  end,
  can_use = Util.TrueFunc,
  on_use = function(self, room, effect)
    local player = effect.from
    local to = effect.tos[1]
    local cid = effect.cards[1]
    if not cid then return end
    room:obtainCard(to, cid, true, fk.ReasonGive, player, skel.name)
    if not to.dead and table.contains(to:getCardIds("h"), cid) and to.kingdom == "han"  then
      Fk:filterCard(cid, to)
      if Fk:getCardById(cid).trueName == "slash" then
        room:askToUseRealCard(to, {
          pattern = {cid}, cancelable = false, extra_data = {bypass_times = true}, skill_name = skel.name,
          prompt = "#rmt__wuying-use",
        })
      end
    end
  end,
})

Fk:loadTranslationTable{
  ["rmt__wuying"] = "武英",
  [":rmt__wuying"] = "主公技，出牌阶段，你可以将一张【杀】交给一名其他角色，若其为汉势力，令其使用之。",
  ["#rmt__wuying"] = "武英：将一张【杀】交给一名角色，若其为汉势力，令其使用之",
  ["#rmt__wuying-use"] = "武英：请使用此【杀】！",

  ["$rmt__wuying1"] = "如此，一击可擒也。",
  ["$rmt__wuying2"] = "如此，霸业可图也。",
}

return skel
